package homework.five.S_5_1;

import java.util.HashMap;
import java.util.Map;

public class TestMap {
    public static void main(String[] args) {

        Map<String, String> employeeMap = new HashMap<>();

        employeeMap.put("E1001", "张三-市场部");
        employeeMap.put("E1002", "李四-技术部");
        employeeMap.put("E1003", "王五-财务部");

        System.out.println("=== 员工列表 ===");
        for (Map.Entry<String, String> entry : employeeMap.entrySet()) {
            System.out.println("工号: " + entry.getKey() + " | 信息: " + entry.getValue());
        }

        employeeMap.put("E1002", "李四-研发中心");

        employeeMap.remove("E1003");

        System.out.println("\n=== 当前在职员工 ===");
        System.out.println("工号列表: " + employeeMap.keySet());
        System.out.println("员工信息: " + employeeMap.values());

        System.out.println("\nE1002的信息: " + employeeMap.get("E1002"));
        System.out.println("是否存在E1003: " + employeeMap.containsKey("E1003"));
    }
}